/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package WindowLogger;

import java.util.logging.Filter;
import java.util.logging.Level;
import java.util.logging.LogRecord;

/**
 *
 * @author xatrix
 */
public class WindowFilter implements Filter {
    private Level level;
    
    public WindowFilter(Level level) {
        this.level = level;
    }
    
    public WindowFilter() {
        this.level = Level.ALL;
    }

    public boolean isLoggable(LogRecord record) {
        if( record.getLevel().intValue() < level.intValue() ) {
            return false;
        }
        else {
            return true;
        }
    }

}
